package com.hqq.concurrency.reactor.framework;

import java.nio.channels.SelectionKey;

/**
 * SameThreadDispatcher
 * Created by heqianqian on 2017/8/5.
 */
public class SameThreadDispatcher implements Dispatcher{
    @Override
    public void onChannelReadEvent(AbstractNIOChannel channel, Object data, SelectionKey selectionKey) {
        channel.getHandler().handleChannelRead(channel,data,selectionKey);
    }

    @Override
    public void stop() throws InterruptedException {
        //no-ops
    }
}
